<template>
	<view class="container">
		<view class='header-wrap' :style="{height: headerHeight + 'px', paddingTop: statusBarHeight+ 'px'}">
			<view class="header-title">
				<view style="color: #FFFFFF;">购物车</view>
			</view>
		</view>
		<view>
			<view class="required-btn"  style="background-color: #C0C4CC;" v-if="number == 0">必选品一键加入</view>
			<view class="required-btn" @tap="onJoin" v-if="number !=0">必选品一键加入</view>
			<view class="required-msg" v-if="number !=0">您还有<text style="color:#F24848 ;">{{number}}</text>件必选品需要加入购物车</view>
		</view>
		<view>
			<view class="cart-list">
				<view class="clear-btn" @tap="deleteInvalidItem" v-if="isShowDeleteInvalid">全部清除</view>
				<block v-for="(item,index) in cartList" :key="index" v-if="cartList.length > 0"> 
					<scroll-view class="cart-item-scroll" scroll-x="true" @scrolltolower="itemScrolltolower(item,$event)">
						<!-- <view class="cart-item" :style="{'border-radius':scrollLeft ? '24rpx 0 0rpx 24rpx' : '24rpx'}"> -->
						<view class="cart-item">
							<view class="cart-item-left">
								<image class="checkbox" v-if="item.requiredFlag==1" :src="imageUrl+'54e594d3be364350813d774ec275d013.png'" mode=""></image>
								<image class="checkbox" v-else @tap="selectItem(item,index)" :src="item.check?imageUrl+'b6d642f1a0034f5bb116cc0607251586.png':imageUrl+'f51bcc4dbb9741a0ac66ea5ec3b89ffd.png'" mode=""></image>
								
								<image class="good-photo" :src="imageUrl+item.toolingImage" mode=""></image>
								<image class="good-status" v-if="item.stockNum == 0" :src="imageUrl+'/youxuan/shouwan.png'" mode=""></image>
								<view class="good-info">
									<view class="good-title">{{item.toolingName}}</view>
									<view class="good-specs">规格：{{item.norm}}</view>
									<view class="good-price"><text class="goods-price-point">￥</text>
									<text>{{ item.price }}</text>
									<view class="add-plus-btn">
										<image class="add-plus-img" :src="imageUrl+'aa0172c5bd5d4b9286a201fbb42b7feb.png'" mode=""></image>
										<text  class="reduce-btn" :class="item.goodsNum <= 1 ? 'disabled' : 'normal'" @tap="item.goodsNum>1?reduceItem(item):''"></text>
										<input type="number" :disabled="true" :value="item.goodsNum==''||item.goodsNum<1?1:item.goodsNum" @blur="confirmCartNum(item,$event)" @confirm="confirmCartNum(item,$event)" 
										@input="confirmCartNum(item,$event)" />
										<text  class="add-btn"  @tap="addItem(item)"></text>
									</view>
								</view>
							</view>
						</view>
						<view class="good-delete" @tap="deleteItem(item)">删除</view>
						</view>
					</scroll-view>
				</block>
		</view>
		<view class="cart-settlement">
			<view class="cart-msg">
				<view class="total">
					<text style="margin-right: 14rpx;">
						已选择<text style="color:#F24848;">{{selectNum}}</text>件商品
					</text>
						<text>合计：</text><text style="color:#F24848">￥</text>
						<text style="color:#F24848;font-size: 40rpx;font-family: DIN;font-weight: bold;">{{totalMoney}}</text>
				</view>
				<view class="define-msg">
					您属于{{toolingLabelName}}换装，下单上线为<text>{{limitMoney}}</text>元
				</view>
			</view>
			<view class="pay-btn" @tap="confirm">
				确认下单
			</view>
		</view>
		<!-- 选择工装采购活动 -->
		<view class="goods-format" v-if="showGoodsFormat" catchtouchmove="ture">
			<view class="format-mask" @tap="hideGoodsFormat"></view>
				<view class="goods-format-box">
					<view class="title">
						<view class="title-msg">请选择工装采购活动</view>
						<view class="title-btn" @tap="confirmOrder">确定</view>
					</view>
					<view v-for="(item, index) in list" :key="index" style="display: flex;justify-content: space-between;align-items: center;;font-size: 28rpx;font-family: PingFang SC;font-weight: 400;height: 104rpx;line-height: 104rpx;">
						<view>{{item.name}}</view>
						<view style="display: flex;align-items: center;">
						<image style="width: 40rpx;height:40rpx;"  @tap="radioItem(item,index)" :src="item.check?imageUrl+'b6d642f1a0034f5bb116cc0607251586.png':imageUrl+'f51bcc4dbb9741a0ac66ea5ec3b89ffd.png'" mode=""></image>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</view>
</template>

<script>
	export default {
		data() {
			return {
				statusBarHeight:'',
				headerHeight:'',
				cartList:[],
				imageUrl:'http://124.71.202.247:8080/image/',
				flag:true,//全选
				selectNum:0,//购物车选择数量
				totalMoney:0,//购物车选择总金额
				totalNum:0,//购物车默认全选的时候的数量
				selectMoney:0,//购物车默认全选的时候的金额
				limitMoney:'',//下单上线金额
				toolingLabelName:'',//属于哪个部门
				cartIds:[],//购物车id的数组
				number:0,
				showGoodsFormat:false,
				isWrap:true,
				list: [],
				item:[],//选择活动列表
				goodItem:{},
				listId:'',//选中的活动的id
				orderList:[],//下单的订单
				nochooseIndex:[],//未选择的列表index
				isShowDeleteInvalid:true,
				
			}
		},
		onReachBottom: function () {
			console.log('触底加载》》》')
		
		},
		onLoad() {
			var that =this;
			const checkResult = uni.getStorageSync('checkResult');
			console.log(checkResult,'checkResult>>>>>>')
			if(checkResult != null){
				that.limitMoney=checkResult.limitMoney;
				that.toolingLabelName=checkResult.toolingLabelName;
			}
			
		},
		onShow() {
			var that=this;
			that.cartList=[];
			that.cartIds=[];
			that.isShowDeleteInvalid=true;
			that.$nextTick(function(){
				that.getCartList();
				that.totalMoney=that.selectMoney;
			})
			console.log(that.cartList,'that.cartList>>>>>>')
			console.log(that.totalMoney,'that.totalMoney》》》》')
			that.getRequiredNum();
			that.showGoodsFormat=false;
			uni.getSystemInfo({
				success: (res) => {
					const menuButton = uni.getMenuButtonBoundingClientRect()		// 胶囊
					const navBarPadding = (menuButton.top - res.statusBarHeight) * 2	
					that.statusBarHeight = res.statusBarHeight
					that.navHeight = menuButton.height + navBarPadding		
					that.headerHeight = that.navHeight + that.statusBarHeight
					console.log(that.headerHeight,'that.headerHeight>>>>>>>>>')
				}
			})
			
		},
		
		methods:{
			// 选中某个单选框时，由radio时触发
			radioChange(e) {
				console.log(e);
			},
			// 选中任一radio时，由radio-group触发
			radioGroupChange(e) {
				console.log(e);
			},
			getCartList(){
				var that = this;
				that.sendRequest({
					url :"/info",
					method : "GET",
					data : {},
					hideLoading : true,
					success:function (res) {
						if(res.result != null){
							that.isShowDeleteInvalid=true;
							console.log(res,'info购物车列表')
							var cartList = res.result.shoppingCartItemModels;
							
							cartList.forEach(v=>{
								that.$set(v,'check',true)
								var toolingId=v.toolingId;
								that.cartIds.push(toolingId);
								
							})
							console.log(that.cartIds,'that.cartIds>>>>>>')
							that.cartList=cartList;
							that.$nextTick(function(){
								that.selectMoney=res.result.totalMoney;
								that.totalNum=res.result.totalNum;
								if(that.flag){
									that.selectNum = that.totalNum;
									that.totalMoney=that.selectMoney;	
								}
								console.log(that.selectMoney,'that.totalNum>>>>>>>>888888')
								console.log(that.selectNum,'that.selectNum99999999')
								
								console.log(that.cartList,'that.cartList>>>>>>>')
								if(that.selectNum>0){
									uni.setTabBarBadge({
									  index: 1,
									  text: that.selectNum.toString()
									})
								}else{
									uni.removeTabBarBadge({
										 index: 1
									})
								}
							})
							that.getRequiredNum();
							
						}else{
							that.isShowDeleteInvalid=false;
							that.selectNum = 0;
							that.totalMoney= 0;
						}
						
						
					}
				})
				
			},
			// 点击选择/取消选择
			selectItem(itemData){
				console.log(itemData,6767657576)
				for(let i=0;i<this.cartList.length;i++){
					if(this.cartList[i].toolingId === itemData.toolingId && this.cartList[i].norm === itemData.norm){
						this.cartList[i].check = !this.cartList[i].check;
						// 如果有条数据没选择,就取消全选
						if(this.cartList[i].check == false){
							this.flag = false;
							this.selectGoodNum -= 1; 
							 this.selectNum -= this.cartList[i].goodsNum;
							 this.totalMoney -= this.cartList[i].money;
							 // let index = this.cartList.findIndex(v=>v.toolingId==itemData.toolingId);
							 // console.log(index,'index>>>>>>>')
							 // this.nochooseIndex.push(index);
						}else{
							this.selectGoodNum += 1;
							this.selectNum += this.cartList[i].goodsNum;
							this.totalMoney += this.cartList[i].money;
							this.goodItem=itemData;
							console.log(this.goodItem,'>>>>>>>>>>')
							if(that.selectNum>0){
								uni.setTabBarBadge({
								  index: 1,
								  text: that.selectNum.toString()
								})
							}else{
								uni.removeTabBarBadge({
									 index: 1
								})
							}
							// 全部选中
							if(this.selectGoodNum == this.cartList.length) {
								this.flag = true;
							}
						}
					}
				}
				console.log(this.selectNum)
				console.log(this.cartList.length)
				
			},
			// 删除某个商品
			deleteItem(row){
				var that =this;
				console.log(row,4645657)
				delete row.check
				var paramsData=[];
				paramsData.push(row);
				console.log(paramsData,'paramsData>>>>>')
				uni.showModal({
					title: '提示',
					content: `确认删除${row.toolingName}？`,
					confirmText: '确认',
					cancelText: '取消',
					success: res => {
						if (res.confirm) {
							that.sendRequest({
								url :"/removeGoods",
								method : "DELETE",
								data :paramsData,
								hideLoading : true,
								success:function (res) {
									console.log(res,'删除')
									if(res.result=='删除成功'){
										that.cartList=[];
										that.cartIds=[];
										that.getCartList();
										console.log(that.cartIds,'that.cartIds>>>>>>删除')
										that.getRequiredNum();
										if(that.flag){
											that.$nextTick(function(){
												that.selectNum = that.totalNum;
												that.totalMoney=that.selectMoney;
												console.log(that.selectMoney,'that.totalNum>>>>>>>>888888')
												console.log(that.selectNum,'that.selectNum99999999')
													if(that.selectNum>0){
														uni.setTabBarBadge({
														  index: 1,
														  text: that.selectNum.toString()
														})
													}else{
														uni.removeTabBarBadge({
															 index: 1
														})
													}
											})
											
										}
									}
									
								}
							})
						}
					}
				});
				
				
			},
			//购物车加一
			addItem(row){
				var that = this;
				let params ={
					goodsNum:row.goodsNum,
					money:row.money,
					norm: row.norm,
					price:row.price,
					toolingId:row.toolingId,
					toolingImage:row.toolingImage,
					toolingName:row.toolingName
				}
				uni.showLoading({
					title: '正在增加商品数量，请勿重复点击'
				});
				that.sendRequest({
					url :"/plusOne",
					method : "PUT",
					data:params,
					hideLoading : true,
					success:function (res) {
						console.log(res,'购物车加一')
						if(res.result=='操作成功'){
							that.cartList.forEach(v=>{
								if(v.toolingId == row.toolingId){
									v.goodsNum += 1;
								}
								})
								console.log(row,'row.check>>>>>>>')
								if(row.check==true){
									that.selectNum +=1;
									that.totalMoney +=row.price;
									if(that.selectNum>0){
										uni.setTabBarBadge({
										  index: 1,
										  text: that.selectNum.toString()
										})
									}else{
										uni.removeTabBarBadge({
											 index: 1
										})
									}
								}
								uni.hideLoading();
						}		
					}
				})
			},
			//购物车减一
			reduceItem(row){
				var that = this;
				let params ={
					goodsNum:row.goodsNum,
					money:row.money,
					norm: row.norm,
					price:row.price,
					toolingId:row.toolingId,
					toolingImage:row.toolingImage,
					toolingName:row.toolingName
				}
				uni.showLoading({
					title: '正在减少商品数量，请勿重复点击'
				});
				that.sendRequest({
					url :"/cutOne",
					method : "PUT",
					data:params,
					hideLoading : true,
					success:function (res) {
						console.log(res,'购物车减一')
						if(res.result=='操作成功'){
							that.cartList.forEach(v=>{
								if(v.toolingId == row.toolingId){
									v.goodsNum -= 1;
								}
								})
								if(row.check==true){
									that.selectNum -=1;
									that.totalMoney -=row.price;
									if(that.selectNum>0){
										uni.setTabBarBadge({
										  index: 1,
										  text: that.selectNum.toString()
										})
									}else{
										uni.removeTabBarBadge({
											 index: 1
										})
									}
								}
								uni.hideLoading();
						}		
					}
				})
			},
			//还有几件必选产品加入购物车
			getRequiredNum(){
				var that=this;
				console.log(that.cartIds)
				that.sendRequest({
					url :"/tooling/required/number",
					method : "POST",
					data : that.cartIds,
					hideLoading : true,
					success:function (res) {
						console.log(res,'查询还有几件商品未入购物车')
						that.number=res.result;		
					}
				})
			},
			//一键加入必选
			onJoin(){
				var that=this;
				console.log(that.cartIds)
				that.sendRequest({
					url :"/tooling/oneButtonJoin/required",
					method : "POST",
					data : that.cartIds,
					hideLoading : true,
					success:function (res) {
						console.log(res,'一键加入必选')	
						if(res.result=="添加成功"){
							that.getCartList();
						}
						
					}
				})
			},
			
			//下单时选择的活动列表
			confirm(){
				var that=this;
				console.log(that.totalMoney,"that.totalMoney>>>>>>>>32322")
				if(that.totalMoney>that.limitMoney){
					uni.showToast({
						title: `订单已超该员工允许购买的金额上限~`,
						icon: 'none'
					})
					return;
				}
				that.showGoodsFormat=true;
				that.sendRequest({
					url :"/activity/list",
					method : "GET",
					data : {},
					hideLoading : true,
					success:function (res) {
						console.log(res,'下单时选择的活动列表')
						var list=res;
						list.forEach(v=>{
							that.$set(v,'check',false)
						})
						that.list=list;
					},
				})
			},
			//点击遮罩层关闭弹框
			hideGoodsFormat(){
				 let that=this;
				 that.list = [];
				 this.showGoodsFormat = false;
			},
			//选择活动列表
			radioItem(item){
				console.log(item,'选择活动列表')
				for(let i=0;i<this.list.length;i++){
					if(this.list[i].id === item.id){
						this.list[i].check = !this.list[i].check;
						if(this.list[i].check==true){
							this.listId=this.list[i].id;
							}
					}
				}
			},
			//确定下单
			confirmOrder(){
				const userInfo = uni.getStorageSync('userInfo');
				console.log(userInfo.nickName,'userInf>>>>>')
				var goods=[];
				var money="";
				var that=this;
				that.cartList.forEach(v=>{
					if(v.check){
						goods.push(v)
						money += v.money
						// console.log(stockNum,'5345435')
					}
					
				})
				console.log(goods,5756857867867)
				that.sendRequest({
					url :"/order/submit",
					method : "post",
					data : {
						activityId: that.listId,
						delFlag: 0,
						goodsNum: that.selectNum,
						items: goods,
						money: that.totalMoney,
						// money:money,
						orderNo: "",
						remark: "222",
						state: 0,
						user: userInfo.nickName
					},
					hideLoading : true,
					success:function (res) {
						console.log(res,'确定下单')
						if(res.status=='SUCCEED'){
							if(res.result=="下单成功"){
								that.sendRequest({
									url :"/removeGoods",
									method : "DELETE",
									data :goods,
									hideLoading : true,
									success:function (res) {
										console.log(res,'删除')
										if(res.result=='删除成功'){
											that.cartList=[];
											that.cartIds=[];
											that.getCartList();
											console.log(that.cartIds,'that.cartIds>>>>>>删除')
											that.getRequiredNum();
											if(that.flag){
												that.$nextTick(function(){
													that.selectNum = that.totalNum;
														that.totalMoney=that.totalMoney;
															if(that.selectNum>0){
																uni.setTabBarBadge({
																  index: 1,
																  text: that.selectNum.toString()
																})
															}else{
																uni.removeTabBarBadge({
																	 index: 1
																})
															}
												})
											}	
										}
										
									}
								})
								// that.cartList=[];
								// that.selectNum=0;
								// that.totalMoney=0;
								// that.getCartList();
								uni.navigateTo({
								   url:"../newOrder/order"
								 })
							}
							}else{
							uni.showToast({
							    title: res.errorMessage,
							    duration: 2000
							});
						}
					},
				})
				
			},
			//清空购物车
			deleteInvalidItem(){
				var that = this;
				that.sendRequest({
					url :"/clear",
					method : "DELETE",
					data : {},
					hideLoading : true,
					success:function (res) {
						console.log(res,'DELETE>>>>>>>>>>')
						if(res.status=='SUCCEED'){
							that.cartIds=[];
							that.getCartList();
							console.log(that.cartIds,'this.cartIds清空购物车。。。。')
							that.getRequiredNum();
							that.cartList=[];
							that.selectNum = 0;
							that.totalMoney = 0;
							if(that.selectNum==0){
								uni.removeTabBarBadge({
									 index: 1
								})
							}
						}
					},
				})
			}
		}
			
			
			
	}
</script>

<style>
	.container{
		width:100%;
		/* height: 100%;
		position: fixed; */
	}
	.header-wrap{
		position: absolute;
		left: 0;
		top: 0;
		width: 100%;
		display: flex;
		justify-content: center;
		align-items: center;
		background: linear-gradient(130deg, #4EBFF9 0%, #266CBE 100%);
		
	}
	.header-title{
		font-size: 36rpx;
		font-family: PingFang SC;
		font-weight: 800;
		line-height: 50rpx;
		color: #FFFFFF;
	}
	.required-btn{
		width: 198rpx;
		height: 48rpx;
		line-height: 48rpx;
		background: #4590E8;
		opacity: 1;
		border-radius: 24rpx;
		margin: 150rpx auto 20rpx;
		font-size: 22rpx;
		text-align: center;
		color: #FFFFFF;
		font-family: PingFang SC;
		font-weight: 400;
	}
	.required-msg{
		/* width: 328px; */
		height: 32rpx;
		font-size: 22rpx;
		font-family: PingFang SC;
		font-weight: 400;
		line-height: 32rpx;
		color: #767777;
		opacity: 1;
		text-align:center;
	}
	/* 购物车列表 */
	.cart-list{
		width: 100%;
		height: 100%;
		padding: 0rpx 32rpx 140rpx 32rpx;
		margin-top: 20rpx;
	}
	.cart-item-scroll{
		width: 100%;
		margin-bottom: 32rpx;
	}
	.cart-item{
		width: 100%;
		height: 234rpx;
		white-space: nowrap;
		background-color: #FFFFFF;
		display: -webkit-box;
		border-radius: 24rpx;
	}
	.cart-item-invalid{
		opacity: 0.75;
		pointer-events: none;
	}
	.cart-item-left{
		width: 100%;
		display: flex;
		justify-content: center;
		align-items: center;
		padding: 30rpx;
		border-radius: 24rpx;
		position: relative;
	}
	.good-delete{
		width: 138rpx;
		height: 234rpx;
		background: #F24848;
		border-radius: 0rpx 24rpx 24rpx 0rpx;
		color: #FFFFFF;
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: 400;
		color: #FFFFFF;
		display: flex;
		justify-content: center;
		align-items: center;
		text-align: center;
	}
	
	.cart-item .checkbox{
		width: 40rpx;
		height: 40rpx;
	}
	
	.cart-item  .good-photo{
		width: 176rpx;
		height: 176rpx;
		margin: 0 30rpx;
		border-radius: 10rpx;
	}
	.cart-item  .good-status{
		width: 199rpx;
		height: 129rpx;
		position: absolute;
		left: 86rpx;
		top: 12rpx;
	}
	.cart-item .good-info{
		flex: 1;
		position: relative;
	}
	.cart-item .good-info .good-title{
		font-size: 30rpx;
		font-family: PingFang SC;
		/* font-weight: 800; */
		line-height: 42rpx;
		color: #323332;
		width: 360rpx;
		white-space: nowrap;
		text-overflow: ellipsis;
		overflow: hidden;
	}
	.cart-item .good-info .good-specs{
		height: 34rpx;
		font-size: 24rpx;
		font-family: PingFang SC;
		font-weight: 400;
		line-height: 34rpx;
		color: #555756;
	}
	.cart-item .good-info .good-standard{
		font-size: 24epx;
		font-family: PingFang SC;
		font-weight: 400;
		line-height: 34rpx;
		color: #555756;
		margin-top: 20rpx;
	}
	.cart-item .good-info .good-standard .limit{
		padding: 0 10rpx;
		display: inline-block;
		height: 40rpx;
		line-height: 40rpx;
		background: #FBEAEB;
		border-radius: 20rpx 20rpx 20rpx 0rpx;
		color: #F24848;
		margin-left: 20rpx;
		font-size: 20rpx;
	}
	.cart-item .good-info .good-price{
		font-size: 40rpx;
		font-family: DIN;
		font-weight: bold;
		color: #F24848;
		text-align: left;
		margin-top: 20rpx;
	}
	.cart-item .good-info .price-point{
		font-size: 22rpx;
	}
	.cart-item .good-info .origin-price{
		font-size: 22rpx;
		font-family: DIN;
		font-weight: 500;
		line-height: 26rpx;
		color: #A0A2A0;
		text-decoration: line-through;
		margin-left: 12rpx;
	}
	.cart-item .add-plus-btn{
		width: 153rpx;
		height: 50rpx;
		position: absolute;
		right: 0;
		bottom: 0;
	}
	.cart-item .add-plus-btn .add-plus-img{
		width: 153rpx;
		height: 50rpx;
	}
	.cart-item .add-plus-btn>input{
		width: 44rpx;
		height: 44rpx;
		position: absolute;
		left: 50%;
		margin-left: -22rpx;
		top: 0;
		text-align: center;
		font-size: 32rpx;
		color: #323332;
	}
	.cart-item .add-plus-btn>.add-btn{
		width: 60rpx;
		height: 64rpx;
		position: absolute;
		right: -5px;
		top: -5px;
		/* font-size: 60rpx;
		background: #F8F8F8;
		text-align: center;
		line-height: 64rpx; */
	}
	.cart-item .add-plus-btn>.disabled{
		color: #ccc; 
	}
	.cart-item .add-plus-btn> .normal{
		color: black;
	}
	.cart-item .add-plus-btn>.reduce-btn{
		width: 60rpx;
		height: 64rpx;
		position: absolute;
		left: -5rpx;
		top: -5rpx;
		/* font-size: 60rpx;
		background: #F8F8F8;
		text-align: center;
		line-height: 64rpx; */
	}
	
	.good-item-title{
		display: flex;
		align-items: center;
		justify-content: space-between;
		font-size: 24rpx;
		font-family: PingFang SC;
		font-weight: 500;
		line-height: 34rpx;
		color: #838583;
		margin-bottom: 32rpx;
	}
	.clear-btn{
		text-align: right;
		color: #F24848;
		margin-bottom: 10rpx;
		font-size: 28rpx;
	}
	.no-cart-list{
		width: 100%;
		height: 630rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}
	.no-cart-list image{
		width: 402rpx;
		height: 346rpx;
		
	}
	.no-cart-list .tips{
		font-size: 24rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #C7CDD4;
		margin: 60rpx 0 48rpx 0;
	}
	.no-cart-list .btn{
		width: 226rpx;
		height: 96rpx;
		background-position: 0 0;
		background-size: 226rpx 96rpx;
		line-height: 78rpx;
		font-size: 28rpx;
		font-family: PingFang SC;
		font-weight: 400;
		color: #FFFFFF;
		text-align: center;
	}
	.cart-settlement{
		width: 100%;
		height: 120rpx;
		position: fixed;
		bottom: 0;
		left: 0;
		background: #FFFFFF;
		box-shadow: 0px -6rpx 12rpx rgba(0, 0, 0, 0.08);
		display: flex;
		align-items: center;
		justify-content: center;
		padding: 0 32rpx;
		z-index: 999;
	}
	.cart-msg{
		width: 70%;
		
	}
	.clear-btn{
		color: #F24848;
	}
	
	.total{
		display: flex;
		height: 34rpx;
		font-size: 24rpx;
		font-family: PingFang SC;
		font-weight: 800;
		line-height: 34rpx;
		color: #323332;
	}
	.choose{
		/* width: 176rpx; */
		height: 34rpx;
		font-size: 24rpx;
		font-family: PingFang SC;
		font-weight: 800;
		line-height: 34rpx;
		color: #323332;
		opacity: 1;
	}
	.totalMoney{
		height: 34rpx;
		font-size: 24rpx;
		font-family: PingFang SC;
		font-weight: 800;
		line-height: 34rpx;
		color: #323332;
		margin-left: 14rpx;
	}
	.define-msg{
		font-size: 24rpx;
		font-family: PingFang SC;
		font-weight: 800;
		line-height: 34rpx;
		color: #323332;
		margin-top: 10rpx;
	}
	.pay-btn{
		width: 200rpx;
		height: 70rpx;
		line-height: 70rpx;
		text-align: center;
		font-size: 30rpx;
		color: #FFFFFF;
		background: linear-gradient(89deg, #4EBFF9 0%, #4590E8 100%);
		box-shadow: 0px 6rpx 12rpx rgba(14, 92, 183, 0.44);
		opacity: 1;
		border-radius: 34rpx;
	}
	.goods-format{
	  width: 100%;
	  height: 100%;
	  background: rgba(0, 0, 0, 0.6);
	  position: fixed;
	  top: 0;
	  left: 0;
	  z-index: 1000;
	}
	.format-mask {
	  width: 100%;
	  height: 100%;
	}
	.goods-format-box {
	  width: 750rpx;
	  background: #fff;
	  position: absolute;
	  border-radius: 20rpx 20rpx 0 0;
	  padding: 30rpx;
	  padding-bottom: 0;
	  bottom: 4rpx;
	}
	.title{
		height: 104rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		/* font-size: 28px;
		font-family: PingFang SC;
		font-weight: 400;
		line-height: 40px;
		color: #323332; */
	}
	.title-msg{
		font-size: 28rpx;
		font-family: PingFang SC;
		font-weight: 400;
		height: 104rpx;
		line-height: 104rpx;
		color: #323332;
	}
	.title-btn{
		width: 102rpx;
		height: 48rpx;
		background: #4590E8;
		opacity: 1;
		border-radius: 24rpx;
		color: #FFFFFF;
		font-size: 24rpx;
		text-align: center;
		line-height: 48rpx;
	}
	
	
</style>
